package com.fruit.web.vo.shopcart;

import com.fruit.web.bo.Product;
import com.fruit.web.bo.impl.Productunit;

public class InventoryItem extends Product implements java.io.Serializable{
	
    private Double salesPrice;
    
    private Integer salesQuantity;
    
    private String specialField1;
    
    private String specialField1Description;
    
    private String specialField2;
    
    private String specialField2Description;
    
    private boolean selected;
    
    private Productunit unit;
    
    public InventoryItem(){
    	
    }
	
	public Double getSalesPrice() {
		return salesPrice;
	}
	public void setSalesPrice(Double salesPrice) {
		this.salesPrice = salesPrice;
	}
	public Integer getSalesQuantity() {
		return salesQuantity;
	}
	public void setSalesQuantity(Integer salesQuantity) {
		this.salesQuantity = salesQuantity;
	}
	public void incrementQuantity(Integer number) {
		if (null ==number || 0 == number) {
			salesQuantity++;
		} else {
			salesQuantity+=number;
		}
        
    }
	
	public String getSpecialField1() {
		return specialField1;
	}

	public void setSpecialField1(String specialField1) {
		this.specialField1 = specialField1;
	}

	public String getSpecialField1Description() {
		return specialField1Description;
	}

	public void setSpecialField1Description(String specialField1Description) {
		this.specialField1Description = specialField1Description;
	}

	public String getSpecialField2() {
		return specialField2;
	}

	public void setSpecialField2(String specialField2) {
		this.specialField2 = specialField2;
	}

	public String getSpecialField2Description() {
		return specialField2Description;
	}

	public void setSpecialField2Description(String specialField2Description) {
		this.specialField2Description = specialField2Description;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	public Productunit getUnit() {
		return unit;
	}

	public void setUnit(Productunit unit) {
		this.unit = unit;
	}

	public Double getSubTotal() {
		return this.getSalesPrice() * this.getSalesQuantity();
	}

    /**
     * Decrements the quqntity count and resets the Effect to fire on the
     * next render pass.
     */
    public void decrementQuantity() {
    	salesQuantity--;
    }
    
    

}



